﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI
{
    public class ServiceResult
    {
        public bool IsSuccess { get; set; }

        public int ErrorCode { get; set; }

        public string Message { get; set; }

        /// <summary>
        /// 构建一个没有错误的结果
        /// </summary>
        public ServiceResult()
            : this(true, 0, "no error")
        {

        }

        public ServiceResult(bool isSuccess, int errorCode, string message)
        {
            IsSuccess = isSuccess;
            ErrorCode = errorCode;
            Message = message;
        }
    }
}
